package cn.xinfei.xdecision.data.core.trace;

import lombok.Getter;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD,ElementType.TYPE})
public @interface VarTrace {
    boolean traceEnabled() default true;
    TraceScene traceScene();

    @Getter
    enum TraceScene {
        REAL_COLLECT("R"),
        CREDIT_UPLOAD("C"),
        PRE_COLLECT("P"),
        CREDIT_FETCH("F");
        private final String code;

        TraceScene(String code) {
            this.code = code;
        }
    }
}
